package ru.st.selenium;

import java.util.List;

import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.FindBys;

public class searchCheck {
	
	@FindBy
	(id="username")
	WebElement username;
	
	@FindBy
	(xpath=".//*[@id='loginform']//input[@type='password']")
	WebElement password;
	
	@FindBy
	(xpath=".//*[@id='loginform']//input[@type='submit']")
	WebElement submit;
	
	@FindBy
	(id="q")
	WebElement searchField;
	
	@FindBy
	(xpath=".//div[@id='results']//div[@class='title']")
	List<WebElement> movieList;
	
	
	public void login(String name, String pass) {
		username.clear();
		username.click();
		username.sendKeys(name);
		password.click();
		password.sendKeys(pass);
		submit.click();
	}
	

}
